package gjtx2;

import java.util.Scanner;

public class JudgeName {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("输入作业名：");
        String a=in.next();
        String b=".zip";
        String c=".rar";
        if (a.indexOf(b,a.length()-4)>0|a.indexOf(c,a.length()-4)>0){
            a=a.substring(0,a.length()-4);
            byte [] bytes=a.getBytes();
            if (bytes.length/a.length()==3){
                System.out.println("命名正确！");
                return;
            }
        }
        System.out.println("命名错误!");
    }
}
